<%-- 
    Document   : listusersales
    Created on : Oct 8, 2012, 1:37:24 PM
    Author     : Ahsan
--%>


<%@page import="ca.trader.Beans.UserBean"%>
<%@page contentType="text/html" %>
<%@page import="ca.trader.utils.UIUtils"%>
<%@page import="ca.trader.utils.HttpConsts"%>
<%@page import="ca.trader.user.User"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<% if (!UIUtils.wasUserAuthenticationSuccess(session))
	 {%>
<%	response.sendRedirect(HttpConsts.INDEX_JSP_PAGE);
	 }%>

<jsp:useBean id="user" class="ca.trader.user.User" scope="request" />

<%
	 user = UserBean.
%>
<!DOCTYPE html>
<html>
    <head>
        <jsp:include page="head.jsp" />
        <title>JSP Page</title>
    </head>
    <body>
	<div id="viewprofile">
	    <c:choose>
		<c:when test="${userLookupBean.user == null}">
		    User not found.
		</c:when>
		<c:otherwise>
		    <c:out value="${userLookupBean.user.firstName} ${userLookupBean.user.lastName}" /><br/>
		    <c:out value="${userLookupBean.user.email}" /><br/>
		    <c:out value="${userLookupBean.user.city}, ${userLookupBean.user.region.regionName},  ${userLookupBean.user.country.countryName}" />
		</c:otherwise>
	    </c:choose>
	</div>

        <jsp:include page="footer.jsp" />
    </body>
</html>
